package com.saltfish.library.controller;


import com.saltfish.library.sevice.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.saltfish.library.pojo.Staff;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/staff")
public class StaffController {
    @Autowired
    StaffService staffService;

    @RequestMapping("login")
    public Staff check(Staff staff){
        return staffService.checkLogin(staff);
    }



    @RequestMapping("user")
    public int update(Staff staff){
      return staffService.updataStaff(staff);
    }


}
